package service;

import communication.ParameterizedMessage;
import communication.SubjectRequestHandler;

public abstract class ServiceRequestHandler extends SubjectRequestHandler {
	
	private final AbstractService service;

	public ServiceRequestHandler(String subject, AbstractService service) {
		super(subject);
		
		this.service = service;
	}
	
	public AbstractService getService() {
		return service;
	}
	
	@Override
	public boolean isCorresponding(ParameterizedMessage message) {
		/*if (super.isCorresponding(message)) {
			String target = message.getParameter("target");
			if (target == null) {
				return false;
			}
			if (target.equals(getService().getServiceName())) {
				return true;
			}
		}*/
		
		return super.isCorresponding(message);
		
	}

}
